home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
BCCGRX12.ZIP
/
contrib
/
bcc2grx
/
src
/
bccgrx10.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-22
|
1KB
|
40 lines
/*
* BCC2GRX - Interfacing Borland based graphics programs to LIBGRX
* Copyright (C) 1993 Hartmut Schirmer
*
* see bccgrx.c for details
*/
#include "bccgrx00.h"
void sector(int x,int y,int stangle,int endangle,int xradius,int yradius)
{
_DO_INIT_CHECK;
x += VL;
y += VT;
stangle *= 10;
endangle *= 10;
xradius = XR(xradius);
yradius = YR(yradius);
switch (FPATT) {
case SOLID_FILL :
GrFilledEllipseArc(x,y,xradius,yradius,stangle,endangle,FILL);
if (COL != FILL)
goto frame;
break;
case EMPTY_FILL :
GrFilledEllipseArc(x,y,xradius,yradius,stangle,endangle,COLBG);
if (COL != COLBG)
goto frame;
break;
default :
FILLP.gp_bmp_fgcolor = FILL;
FILLP.gp_bmp_bgcolor = COLBG;
GrPatternFilledEllipseArc(x,y,xradius,yradius,stangle,endangle,&FILLP);
frame:
GrEllipseArc( x, y, xradius, yradius, stangle, endangle, COL);
GrLine( _grx_arc_xs, _grx_arc_ys, _grx_arc_xc, _grx_arc_yc, COL);
GrLine( _grx_arc_xc, _grx_arc_yc, _grx_arc_xe, _grx_arc_ye, COL);
}
}